﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Subtle.Domain.Models;

namespace Subtle.Domain.Services.Interfaces
{
	/// <summary>
	/// User Service Contract
	/// </summary>
	public interface IUserService
	{
		/// <summary>
		/// Create a Validated User
		/// </summary>
		/// <param name="user"></param>
		/// <returns></returns>
		UserCreateStatus CreateValidatedUser(User user);

		/// <summary>
		/// Create a Non Validated User
		/// </summary>
		/// <param name="user"></param>
		UserCreateStatus CreateNonValidatedUser(User user);

		/// <summary>
		/// Send Validate User Request
		/// </summary>
		/// <param name="user"></param>
		bool SendValidateUserRequest(User user);

		/// <summary>
		/// Validate User
		/// </summary>
		/// <param name="user"></param>
		/// <param name="validationGuid"></param>
		/// <returns></returns>
		bool ValidateUser(User user, string validationGuid);
		
		/// <summary>
		/// Get a User
		/// </summary>
		/// <param name="userID"></param>
		/// <returns></returns>
		User GetUser(int userID);

		/// <summary>
		/// Get a User
		/// </summary>
		/// <param name="username"></param>
		/// <returns></returns>
		User GetUser(string username);

		/// <summary>
		/// Get User
		/// </summary>
		/// <param name="username"></param>
		/// <param name="password"></param>
		/// <returns></returns>
		User GetUser(string username, string password);

		/// <summary>
		/// Change Password
		/// </summary>
		/// <param name="user"></param>
		/// <param name="newPassword">Returns true if the Password change was successul</param>
		/// <returns></returns>
		bool ChangePassword(User user, string newPassword);

		/// <summary>
		/// Change the User's Email Address
		/// </summary>
		/// <param name="user"></param>
		/// <param name="newEmailAddress"></param>
		/// <returns>Returns true if the Password change was successul</returns>
		bool ChangeEmailAddress(User user, string newEmailAddress);

		/// <summary>
		/// Send Password Reminder
		/// </summary>
		/// <param name="user"></param>
		/// <returns></returns>
		bool SendPasswordReminder(User user);

		/// <summary>
		/// Hash Password
		/// </summary>
		/// <param name="originalPassword"></param>
		string HashPassword(string originalPassword);
	}
}
